<?php
use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel common\modules\content\models\search\WidgetTextSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('backend', 'Text Blocks');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="text-block-index">

    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a(Yii::t('backend', 'Create {modelClass}', ['modelClass' => 'Text Block']), ['create'], ['class' => 'btn btn-success'])?>
    </p>

    <?= GridView::widget(['dataProvider' => $dataProvider,'filterModel' => $searchModel,'columns' => [['class' => 'yii\grid\SerialColumn'],'id','key','title',['class' => \common\grid\EnumColumn::className(),'attribute' => 'status','enum' => [Yii::t('backend', 'Disabled'),Yii::t('backend', 'Enabled')]],['class' => 'yii\grid\ActionColumn','template' => '{update}{delete}']]]);?>

</div>
